package com.dzt.androidframework.photo;

import android.content.Intent;
import android.os.Bundle;

import com.dzt.androidframework.R;
import com.dzt.androidframework.activity.ActivityTitle;
import com.github.chrisbanes.photoview.PhotoView;
import com.squareup.picasso.Picasso;

import org.xutils.view.annotation.ViewInject;

public class PhotoViewActivity extends ActivityTitle {

	@ViewInject(R.id.photo_view)
	private PhotoView photoView;

	@Override
	protected int getLayoutId() {
		return R.layout.activity_photo_view;
	}

	@Override
	protected void initParams() {
		Intent intent = getIntent();
		String url = intent.getStringExtra("url");
		String name = intent.getStringExtra("name");
		Picasso.with(this)
				.load(url)
				.into(photoView);
		setTitleView(name);
	}

	@Override
	protected void initData(Bundle savedInstanceState) {

	}

	@Override
	protected String[] initPermissions() {
		return new String[0];
	}
}
